package src.main.celue;

public class TestStrategy {
    public static void main(String[] args) {

        // 传入步行导航策略
        Walk walk = new Walk();
        NavigationContext navigationContext = new NavigationContext(walk);
        navigationContext.elapsedTime();
        // 传入骑车导航策略
        navigationContext.setNavigation(new Bike());
        navigationContext.elapsedTime();
        // 传入开车导航策略
        navigationContext.setNavigation(new Car());
        navigationContext.elapsedTime();



    }
}
